<template>
  <div id="mtt">
    <div>
      <p style="color:#95252E">企业基本信息</p>
      <el-button type="primary" @click="input" size="mini" style="float:right;margin-top:-30px;">一键填入基本信息</el-button>
    </div>
    <div>
      <el-form ref="form" :model="form" label-width="80px" :disabled="formdisabled">
        <el-form-item class="pass" style="margin-left:-60px">
          <el-input placeholder="企业名称" v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item class="pass" style="margin-left:-60px">
                   <el-select v-model="form.nature" placeholder="企业性质">
            <el-option label="国有企业" value="shanghai"></el-option>
            <el-option label="私营企业" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item class="pass" style="margin-left:-60px">
                    <el-input placeholder="企业类型" v-model="form.type"></el-input>
        </el-form-item>
        <el-form-item class="pass" style="margin-left:-60px">
          <el-input placeholder="企业法人" v-model="form.legalperson"></el-input>
        </el-form-item>
                <el-form-item class="pass" style="margin-left:-60px">
          <el-input placeholder="企业电话" v-model="form.tel"></el-input>
        </el-form-item>
                <el-form-item class="pass" style="float:right;margin-top:-315px;margin-right:400px">
          <el-input placeholder="企业地址" v-model="form.address"></el-input>
        </el-form-item>
        <el-form-item class="pass" style="float:right;margin-top:-252px;margin-right:400px">
          <el-input placeholder="注册资本/万" v-model="form.capital"></el-input>
        </el-form-item>
        <el-form-item class="pass" style="float:right;margin-top:-190px;margin-right:400px">
          <el-input placeholder="企业注册时间" v-model="form.time"></el-input>
        </el-form-item>
                <el-form-item class="pass" style="float:right;margin-top:-125px;margin-right:400px">
          <el-input placeholder="统一社会信用编码" v-model="form.code"></el-input>
        </el-form-item>
      </el-form>
    </div>
    <div>
        <p style="float:right;margin-right:280px;margin-top:-350px;color:#95252E">企业申报项目</p>
        <el-form ref="form" :model="form" label-width="80px" :disabled="formdisabled">
        <el-form-item class="pass" style="float:right;margin-right:150px;margin-top:-315px">
          <el-input placeholder="项目名称" v-model="form.name1"></el-input>
        </el-form-item>
                <el-form-item class="pass" style="float:right;margin-right:150px;margin-top:-255px">
                   <el-select v-model="form.type1" placeholder="申报类型">
            <el-option label="科技类" value="科技类"></el-option>
            <el-option label="农业类" value="农业类"></el-option>
            <el-option label="军事类" value="军事类"></el-option>
            <el-option label="商业类" value="商业类"></el-option>
          </el-select>
          </el-form-item>
                  <el-form-item class="pass" style="float:right;margin-right:150px;margin-top:-190px">
          <el-input placeholder="申报金额" v-model="form.money"></el-input>
        </el-form-item>
                  <el-form-item>
    <el-button type="danger" @click="onSubmit" style="float:right;margin-right:230px;margin-top:-130px">提交</el-button>
  </el-form-item>
        </el-form>


    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      formdisabled:false,
      form: {
        name: "",
        nature: "",
        type: "",
        legalperson: "",
        tel:'',
        address:'',
        capital: "",
        time: "",
        code:'',
        name1:'',
        type1:'',
        money:'',
        jindu:'审核中'

        
      },
    };
  },
  methods: {
    onSubmit() {
      alert("提交成功");
      sessionStorage.setItem('project',JSON.stringify (this.form));
      this.formdisabled=true;
      // console.log(JSON.parse(sessionStorage.getItem('project')));
    },
        async input() {
      let result = await this.$http.get("/data/company.json");
      // console.log(result.data);

      this.form.name = result.data.name;
      this.form.nature = result.data.nature;
      this.form.type = result.data.type;
      this.form.legalperson = result.data.legalperson;
      this.form.capital = result.data.capital;
      this.form.time = result.data.time;
      this.form.tel = result.data.tel;
      this.form.address = result.data.address;
      this.form.code = result.data.code;
    },
  }
};
</script>
<style>
#mtt {
  width: 100%;
  /* background-color: #eaba83; */
    background: url("/images/signimg.jpg") center center no-repeat;
  background-size: 100% 100%;
}
.pass {
  width: 300px;
}
</style>